//
//  GWVerticalButton.m
//  百思不得姐
//
//  Created by qianfeng on 16/3/2.
//  Copyright © 2016年 高炜. All rights reserved.
//

#import "GWVerticalButton.h"

@implementation GWVerticalButton

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self =[super initWithFrame:frame]) {
        [self setUp];
    }
    return self;
}
-(void)awakeFromNib
{
    [self setUp];
}

-(void)setUp
{
    self.titleLabel.textAlignment =NSTextAlignmentCenter;
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imageView.x=0;
    self.imageView.y=0;
    self.imageView.size =self.imageView.image.size;
    
    self.titleLabel.x =0;
    self.titleLabel.y=self.width;
    self.titleLabel.width =self.width;
    self.titleLabel.height =self.height-self.width;
}
@end
